<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>导航图标的改变</title>
    <style>
		.menu{
			padding: 5px 0;
			width: 25px;
			height: 3px;
			background: black;
			background-clip: content-box; //背景颜色从内容区域开始绘制
			border-top: 3px solid black;
			border-top: 3px solid black;
			border-bottom: 3px solid black;
		}
         .close{
			 padding: 5px 0;
            position: relative;
            width: 25px;
            height: 25px;
        }
        
        .close::before,
        .close::after {
            position: absolute;
            content: ' ';
            background-color: black;
            left: 5px;
            width: 1px;
            height: 25px;
        }
        
        .close::before {
            transform: rotate(45deg);
        }
        
        .close::after {
            transform: rotate(-45deg);
        }
    </style>
</head>
<body >
          <div id="ces" class="menu"></div>
</body>
<script src="http://g.ydbcdn.com/jquery/latest/jquery.min.js"></script>
<script>
    $("#ces").click(function(){
		$(this).toggleClass("menu");
		$(this).toggleClass("close");
	})
</script>
</html>